#pragma once
#include <gdiplus.h>

class Cgdiplustest2View : public CView
{
protected:
    Cgdiplustest2View();
    DECLARE_DYNCREATE(Cgdiplustest2View)

public:
    Cgdiplustest2Doc* GetDocument() const;

    void OnDraw(CDC* pDC);
    BOOL PreCreateWindow(CREATESTRUCT& cs);
    BOOL OnEraseBkgnd(CDC *pDC);

    virtual ~Cgdiplustest2View();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif

private:
    Gdiplus::InterpolationMode interpolationMode;
    int zoom;
    SIZE CalcDispSize(int imageW, int imageH, int windowW, int windowH);
    void MenuItemUpdate(void);

protected:
    DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnMag1();
    afx_msg void OnMag2();
    afx_msg void OnMag3();
    afx_msg void OnMag4();
    afx_msg void OnIm0();
    afx_msg void OnIm1();
    afx_msg void OnIm2();
    afx_msg void OnIm3();
    afx_msg void OnIm4();
    afx_msg void OnIm5();
    afx_msg void OnIm6();
    afx_msg void OnIm7();
};

#ifndef _DEBUG
inline Cgdiplustest2Doc* Cgdiplustest2View::GetDocument() const
   { return reinterpret_cast<Cgdiplustest2Doc*>(m_pDocument); }
#endif
